<template>
	<div class="container container-table error-500" style="display:none">
		<div class="row vertical-10p">
			<div class="container">
				<img src="/static/img/logo.png" class="center-block logo">
				<div class="text-center col-sm-6 col-sm-offset-3">
					<h1>简单讲就是出错啦！</h1>
					<h4>{{msg}}</h4>
					<div class="error_ops">
						<a class="e_back" @click="eBack">返回</a>
						<a class="e_refresh" @click="eRefresh">重新加载试试？</a>
						<a class="e_close" @click="eClose">我不听!</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>
<script type="text/ecmascript-6">
	import router from '../router'

	let lIndex;
	export default {
		data() {
			return {
				msg:''
			}
		},
		mounted(){
			router.afterEach(() =>{
				layer.close(lIndex);
			});
		},
		methods:{
			show(){
				this.$nextTick(function () {
					lIndex=layer.open({
						type:1,
						area:['100%','100%'],
						title: false,
						closeBtn: 0,
						scrollbar: false,
						id:'errorPage',
						anim:false,
						content: $(this.$el)
					});
				});
			},
			eBack(){
				router.go(-1);
			},
			eRefresh(){
				router.go(0);
			},
			eClose(){
				layer.close(lIndex);
			}
		}
	}
</script>

<style>
</style>
